import Vue from 'vue'
import Router from 'vue-router'
import routes from './routes'
Vue.use(Router)


//路由白名单（用于不需要验证的路由）
const whiteList = [
    '/404'
]

const router = new Router({
    linkActiveClass: 'active',
    routes: routes,
    scrollBehavior(to, from, savedPosition) {
        if (savedPosition) {
            return savedPosition
        } else {
            return { x: 0, y: 0 }
        }
    }
})

export default router

